﻿
Partial Class Empresas_Evaluacion_Evaluacion
    Inherits PaginaComun

    Protected Sub GridView2_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView2.RowCommand
        Select Case e.CommandName
            Case "Evaluar"
                Dim index As Integer = Convert.ToInt32(e.CommandArgument)
                GridView2.SelectedIndex = index
                Me.Pk1 = GridView2.SelectedValue
                Me.MultiView1.ActiveViewIndex = 1
        End Select
    End Sub

    Protected Sub BtnEnviar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnEnviar.Click
        Dim obj As New Evaluaciones
        obj.PUNTUALIDAD = TxtPunt.Value
        obj.IMAG_PRES_PERS = TxtImag.Value
        obj.EXPRE_VERB_ESC = TxtExp.Value
        obj.MAN_APLI_OFFI = TxtMan.Value
        obj.RESPONSABILIDAD = TxtResp.Value
        obj.INTE_EQUI_TRA = TxtInt.Value
        obj.RECOMENDACIONES_EVA = TxtRec.Text
        obj.CONSIDERA = Util.invN1_0(RbSi.Checked)
        obj.RAZ_CONSI = TxtPor.Text
        obj.EVALUADOR = TxtNomEval.Text
        obj.ID_OFER_EST = Me.Pk1
        obj.TIP_EVAL = Me.CmbTipEval.SelectedValue
        obj.CARGO_EVAL = Me.TxtCargEval.Text
        Me.MsgModalPanel.Text = obj.Insert
        If obj.lErrorG = False Then
            ImgRst.ImageUrl = "~/imagenes/good.png"
        Else
            ImgRst.ImageUrl = "~/imagenes/error.png"
        End If

        ModalPopup.Show()
    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        If Me.ImgRst.ImageUrl = "~/imagenes/good.png" Then
            Me.MultiView1.ActiveViewIndex = 0
        Else
            Me.MultiView1.ActiveViewIndex = 1
        End If
    End Sub
End Class
